#ifndef EFFECTS_H
#define EFFECTS_H

#include "d3dUtil.h"
#include "Light.h"

namespace Effect
{
	class LightEffects
	{
	public:
		LightEffects();
		~LightEffects(void);

		void Init(ID3D10Device*	device);

		void BuildFX();
		void BuildVertexLayouts();

		ID3D10InputLayout*	GetInputLayout();
		ID3D10EffectTechnique* GetEffectTech();

		void SetWorldMatrix(const D3DXMATRIX& matWorld);
		void SetTextureMatrix(const D3DXMATRIX& matTex);
		void SetWVPMatrix(const D3DXMATRIX& matWVP);
		void SetEyePos(const D3DXVECTOR3& pos);
		void SetLight(const Light& light);
		void SetDiffuseMap(ID3D10ShaderResourceView* resView);
		void SetSpecMap(ID3D10ShaderResourceView* resView);

	private:

		ID3D10Device*				m_pDevice;
		ID3D10Effect*				m_pFx;
		ID3D10InputLayout*			m_pInputLayout;
		ID3D10EffectTechnique*		m_pFxTech;

		ID3D10EffectShaderResourceVariable*	m_pFxDiffuseMapVar;
		ID3D10EffectShaderResourceVariable* m_pFxSpecMapVar;

		ID3D10EffectMatrixVariable*	m_pFxWVPVar;
		ID3D10EffectMatrixVariable*	m_pFxWorldVar;
		ID3D10EffectMatrixVariable* m_pFxTexMtxVar;

		ID3D10EffectVariable*		m_pFxEyePosVar;
		ID3D10EffectVariable*		m_pFxLightVar;
	};
}


#endif